package com.binance.notification.api.push.notification;

import org.hibernate.validator.constraints.NotBlank;

import com.binance.master.utils.JsonUtils;
import com.binance.notification.api.push.INotification;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class AbstractNotification implements INotification {

    private static final long serialVersionUID = 8124095442579777069L;

    @ApiModelProperty(hidden = true)
    private String id;
    @ApiModelProperty(value = "业务类型", required = false)
    private String busType;
    @ApiModelProperty(value = "标题", required = true)
    @NotBlank
    private String title;
    @ApiModelProperty(value = "内容", required = true)
    @NotBlank
    private String content;
    @ApiModelProperty(value = "数据载体")
    private Object payload;

    @Override
    public String toString() {
        return JsonUtils.toJsonNotNullKey(this);
    }
}
